//
//  newsTableViewCell.m
//  movie
//
//  Created by 李丹阳 on 15/7/21.
//  Copyright (c) 2015年 李丹阳. All rights reserved.
//

#import "newsTableViewCell.h"

@implementation newsTableViewCell

- (void)awakeFromNib {
    // Initialization code
    
}


- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (void)setModal:(newsModal *)modal{
    _modal = modal;
    [self setNeedsLayout];
}

- (void)layoutSubviews{
//    NSLog(@"222.");
    [super layoutSubviews];
    _titleLabel.text = _modal.title;
    _summaryLabel.text = _modal.summary;
    [_iconImage sd_setImageWithURL:[NSURL URLWithString:_modal.image]];
    if (_modal.type == 1) {
        _typeImage.hidden = NO;
    }
    else{
        _typeImage.hidden = YES;
    }
    
}
@end
